<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        <button onclick="doAjax()">$.ajax(...)</button>
        <button>$.get(...)</button>
        <button>$.getJson(...)</button>
        <button>$.post(...)</button>
        <button>$("selecor").load(...)</button>
    </div>
    <div id="result">

    </div>
    <script src="js/jquery.min.js"></script>
    <script>
        function doAjax() {
            let url="http://localhost/doAjax";
            let params = "msg=hello ajax";
            $.ajax({
                url: url,
                data: params,
                success: function (result) {
                    $("#result").html(result);
                },
                error: function () {
                    $("#result").html("request fail");
                }
            });
        }
    </script>
</body>
</html>